<template>
  <div class="app-footer">
    <van-row class="footer-main" type="flex" align="center" justify="space-around">
      <div v-for="(item, key) in footer" :key="key" class="item" @click="toPath(item['name'])" >
        <van-image class="icon" :src="item['icon']" />
        <div>{{ item['name'] }}</div>
      </div>
    </van-row>
  </div>
</template>

<script>
import { Row } from 'vant'

export default {
  name: 'Navs',
  components: {
    [Row.name]: Row
  },
  data () {
    return {
      footer: this.$store.getters.appFooter
    }
  },
  props: {
    msg: String
  },
  methods: {
    toPath (path) {
      this.$router.push(`/${path}`)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  background: #FFFFFF;
  .footer-main{
    height: 50px;
    font-size: 13px;
    color: #999999;
    .icon{
      width: 18px;
      height: 18px;
    }
    .item{
      width: 60px;
    }
  }
}
</style>
